<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
     
        <div class="layui-form-item">
            <label class="layui-form-label">所属分类</label>
            <div class="layui-input-block">
                <select name="cid" lay-verify="" lay-search>
                    {foreach name="category" item="val"}
                    <option value="{$val.id}" {if condition="$row.cid eq $val.id"}selected="" {/if}>{$val.name}</option>
                    {/foreach}
                </select>     
            </div>
        </div>
        
        <div class="layui-form-item">
            <label class="layui-form-label">商品名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" class="layui-input" lay-verify="required" placeholder="请输入商品名称" value="{$row.name|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">当前价格</label>
            <div class="layui-input-block">
                <input type="text" name="price" class="layui-input" lay-verify="required" placeholder="请输入当前价格 （单位：分）" value="{$row.price|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品数量</label>
            <div class="layui-input-block">
                <input type="text" name="count" class="layui-input" lay-verify="required" placeholder="请输入（预留）商品数量" value="{$row.count|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品短描述</label>
            <div class="layui-input-block">
                <input type="text" name="summary" class="layui-input" lay-verify="required" placeholder="请输入商品短描述" value="{$row.summary|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品详情</label>
            <div class="layui-input-block">
                <input type="text" name="description" class="layui-textarea" placeholder="请输入商品详情" value="{$row.description|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">商品图片</label>
            <div class="layui-input-block layuimini-upload">
                <input name="img" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传商品图片" value="{$row.img|default=''}">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="img" data-upload-number="three" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_img" data-upload-select="img" data-upload-number="three" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
            </div>
        </div> 
       
        <div class="layui-form-item">
            <label class="layui-form-label">商品状态</label>
            <div class="layui-input-block">
                <input type="radio" name="state" value="1" title="未上架" {eq name="row.state" value="0"}checked=""{/eq} >
                <input type="radio" name="state" value="0" title="上架" {eq name="row.state" value="1"}checked=""{/eq}>
                <input type="radio" name="state" value="0" title="下架" {eq name="row.state" value="2"}checked=""{/eq}>
            </div>
        </div>
       
        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>